<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/register.css">
    <link rel="shortcut icon" href="./public/park.ico" type="image/x-icon">
    <title>注册界面</title>
</head>

<body>
    <!-- 用户注册 -->
    <div class="item10" id="item10">
        <a onclick="javascript:history.back()" style="float: left;margin:10px 0 0 10px;cursor: pointer; ">&lt;返回登录</a>
        <h1>注册表</h1>
        <form method="post">
            <table>
                <tr>
                    <th>姓名:</th>
                    <td>
                        <input type="text" name="username" id="username" onchange="changeName()">
                    </td>
                </tr>
                <tr>
                    <th>性别:</th>
                    <td>
                        <select name="sex" id="sex">
                            <option value="男">男</option>
                            <option value="女">女</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>身份证号码:</th>
                    <td>
                        <input type="text" name="CardID" id="CardID" onchange="changeCardID()">
                        <p id="tip1">*请输入18位身份证号</p>
                    </td>
                </tr>
                <tr>
                    <th>手机号码:</th>
                    <td>
                        <input type="text" name="num" id="numPhone" onchange="changeNum()">
                        <p id="tip2">*请输入11位数的手机号</p>
                    </td>
                </tr>
                <tr>
                    <th>密码:</th>
                    <td>
                        <input type="password" name="pwd" id="password" onchange="changepwd()">
                        <img src="./img/show.png" alt="" id="eye">
                        <p id="tip3">*6~18位,非全特殊符号</p>
                    </td>
                </tr>
                <tr>
                    <th>确认密码:</th>
                    <td>
                        <input type="password" name="pwdc" id="re_enter" onchange="changepwdc()">
                        <p id="tip4">*同上</p>
                    </td>
                </tr>
                <tr>
                    <th>车牌号:</th>
                    <td>
                        <input type="text" name="CarID" id="CarID" onchange="changeCarID()">
                    </td>
                </tr>
                <tr>
                    <th>家庭住址:</th>
                    <td>
                        <input type="text" name="homeAddress" id="homeAddress" onchange="changehomeAddress()">
                    </td>
                </tr>
                <tr>
                    <th>房间号</th>
                    <td>
                        <input type="text" name="roomID" id="roomID" onchange="changeroomID()">
                    </td>
                </tr>
                <tr>
                    <th></th>
                    <td colspan="2">
                        <input type="reset" value="重置">
                        <input type="button" value="保存" onclick="btnSave()">
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
<script>
    var input = document.getElementById("password");
    var inputc = document.getElementById("re_enter");
    var img = document.getElementById("eye");
    var flag = 1;
    img.onclick = function () {
        if (flag == 1) {
            input.type = "text";
            inputc.type = "text";
            img.src = "./img/hide.png";
            flag = 0;
        } else {
            input.type = "password";
            inputc.type = "password";
            img.src = "./img/show.png";
            flag = 1;
        }
    }
</script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="./js/register.js"></script>

</html>